package model;

import java.util.Arrays;

public class Session {
    private static int count = 1;
    private int id;
    private String movieName;
    private String hallName;
    private String time; // e.g. 2024-06-01 19:00
    private double price;
    private boolean[][] seats; // true=occupied, false=free

    public Session(String movieName, String hallName, String time, double price, int rows, int cols) {
        this.id = count++;
        this.movieName = movieName;
        this.hallName = hallName;
        this.time = time;
        this.price = price;
        this.seats = new boolean[rows][cols];
        for (boolean[] row : seats) Arrays.fill(row, false);
    }

    public int getId() { return id; }
    public String getMovieName() { return movieName; }
    public String getHallName() { return hallName; }
    public String getTime() { return time; }
    public double getPrice() { return price; }
    public boolean[][] getSeats() { return seats; }

    public void setMovieName(String movieName) { this.movieName = movieName; }
    public void setHallName(String hallName) { this.hallName = hallName; }
    public void setTime(String time) { this.time = time; }
    public void setPrice(double price) { this.price = price; }
}